/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package hello;
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.*;
/**
 *
 * @author Phu@
 */
public class MapBom extends TiledLayer 
{
    public MapBom() throws Exception
    {
        super(10, 10, 
	  Image.createImage("/images/2.gif"), 
	  45, 40);
        
   // Image backgroundImg = Image.createImage("/images/2.jpg");

  // create the tiledlayer background
  //background = new TiledLayer(5, 5, backgroundImg, 16, 16);

  // array that specifies what image goes where
  int[] cells = {
    0, 0, 1, 0, 1, // sky
    0, 0, 0, 0, 0, // sky
    1, 0, 1, 0, 1, // earth
    0, 0, 0, 0, 0, // sea
    1, 0, 1, 0, 1  // sea
  };

  // set the background with the images
  for (int i = 0; i < 100; i++) {
    int column = i % 10;
    int row = (i - column)/10;
    setCell(column, row, 1);
  
  }
      
        
    }
}
